import request from '@/axios/axios.js'

// 列表
export const searchApi = (params) => {
  return request({
    method: 'get',
    url: '/dms/order/page',
    params: params
  })
}

// // 列表
// export const searchApi = (params) => {
//     return request({
//         method: 'post',
//         url: '/dms/productionOrder/page',
//         data: params
//     })
// }
//根据工装编号查询设备信息
export const getDeviceList = (params) => {
    return request({
        method: 'get',
        url: '/dms/productionWork/selectDeviceByMoldCode',
        params: params
    })
}
//根据物料编码查询工装信息
export const getMoldList = (params) => {
    return request({
        method: 'get',
        url: '/dms/productionWork/selectMoldByMaterialCode',
        params: params
    })
}
export const add = (params, status) => {
    return request({
        method: status=='add'?'post':'put',
        url: status == 'add' ? '/dms/productionWork/handProduce' : '/dms/productionWork/updateWorkOrder',
        data: params
    })
}
export const deleteApi = (params) => {
    return request({
        method: 'delete',
        url: '/dms/productionWork/deleteWorkOrder',
        data: params
    })
}



